﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Globalization;

namespace AnonsaiWPF.CSharp
{
    /// <summary>
    /// Interaction logic for Overview.xaml
    /// </summary>
    public partial class WPFOffice2010Silver : Window, IWindow
    {
        public WPFOffice2010Silver()
        {
            InitializeComponent();
            this.MinHeight = 520;
            this.MinWidth = 750;
            this.Loaded += new RoutedEventHandler(WPFOffice2010Black_Loaded);
            slider1.ValueChanged += new RoutedPropertyChangedEventHandler<double>(slider1_ValueChanged);
            this.progressBar1.Maximum = this.slider1.Maximum;

            slider2.ValueChanged += new RoutedPropertyChangedEventHandler<double>(slider2_ValueChanged);
            this.progressBar2.Maximum = this.slider2.Maximum;
            this.progressBar2.Value = this.slider2.Maximum / 2;
        }

        public void SetTheme()
        {
        }
        
        void slider2_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            this.progressBar2.Value = slider2.Value;
        }

        void slider1_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
        {
            this.progressBar1.Value = slider1.Value;
        }

        void WPFOffice2010Black_Loaded(object sender, RoutedEventArgs e)
        {
      
        }


        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();
        }

        public Grid Root
        {
            get
            {
                return this.RootVisual;
            }
        }

        public void DetachContent()
        {
            RemoveLogicalChild(Content);
        }

        private void toggleButton1_Checked(object sender, RoutedEventArgs e)
        {
            System.Windows.Controls.Primitives.ToggleButton toggleButton = sender as System.Windows.Controls.Primitives.ToggleButton;
            if (toggleButton != null)
            {
                toggleButton.Content = "Toggled On";
            }
        }

        private void toggleButton1_Unchecked(object sender, RoutedEventArgs e)
        {
            System.Windows.Controls.Primitives.ToggleButton toggleButton = sender as System.Windows.Controls.Primitives.ToggleButton;
            if (toggleButton != null)
            {
                toggleButton.Content = "Toggled Off";
            }
        }

    }
}
